package com.itheima.controller;

import com.itheima.pojo.OperateLog;
import com.itheima.pojo.PageBean;
import com.itheima.pojo.Result;
import com.itheima.service.OperateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OperateController {
    @Autowired
    private OperateService operateService;
    @GetMapping("/log/page")
    public Result selectOperatePage(@RequestParam(defaultValue = "1")Integer page,
                                    @RequestParam(defaultValue = "10")Integer pageSize){
        PageBean pageBean = operateService.selectPage(page,pageSize);
        return Result.success(pageBean);
    }
}
